{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 反射透射系数矩阵详细表达式\n",
    "\n",
    "+ Author: Zhu Dengda  \n",
    "+ Email:  zhudengda@mail.iggcas.ac.cn"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "np.set_printoptions(linewidth=200)\n",
    "\n",
    "import sympy as sp\n",
    "from sympy.printing.latex import latex\n",
    "from IPython.display import display, Math"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 定义基本变量\n",
    "k, b1, a1, mu1, Omg1, kb1, ka1, w = sp.symbols(r'k b_1 a_1 mu_1 \\Omega_1 k_{b1} k_{a1} \\omega')\n",
    "b2, a2, mu2, Omg2, kb2, ka2 = sp.symbols(r'b_2 a_2 mu_2 \\Omega_2 k_{b2} k_{a2}')\n",
    "lam1, lam2 = sp.symbols(r'\\lambda_1 \\lambda_2')\n",
    "rho1, rho2 = sp.symbols(r'\\rho_1 \\rho_2')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 原推导方法"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}\\frac{- \\Omega_{1} a_{2} \\mu_{1} - \\Omega_{2} a_{1} \\mu_{2} + a_{1} k^{2} \\mu_{1} + a_{2} k^{2} \\mu_{2}}{2 a_{1} \\mu_{1} \\left(- \\Omega_{1} + k^{2}\\right)} & \\frac{k \\left(- \\Omega_{1} \\mu_{1} + \\Omega_{2} \\mu_{2} + a_{1} b_{2} \\mu_{1} - a_{1} b_{2} \\mu_{2}\\right)}{2 a_{1} \\mu_{1} \\left(- \\Omega_{1} + k^{2}\\right)} & \\frac{\\Omega_{1} a_{2} \\mu_{1} - \\Omega_{2} a_{1} \\mu_{2} + a_{1} k^{2} \\mu_{1} - a_{2} k^{2} \\mu_{2}}{2 a_{1} \\mu_{1} \\left(- \\Omega_{1} + k^{2}\\right)} & \\frac{k \\left(- \\Omega_{1} \\mu_{1} + \\Omega_{2} \\mu_{2} - a_{1} b_{2} \\mu_{1} + a_{1} b_{2} \\mu_{2}\\right)}{2 a_{1} \\mu_{1} \\left(- \\Omega_{1} + k^{2}\\right)}\\\\\\frac{k \\left(- \\Omega_{1} \\mu_{1} + \\Omega_{2} \\mu_{2} + a_{2} b_{1} \\mu_{1} - a_{2} b_{1} \\mu_{2}\\right)}{2 b_{1} \\mu_{1} \\left(- \\Omega_{1} + k^{2}\\right)} & \\frac{- \\Omega_{1} b_{2} \\mu_{1} - \\Omega_{2} b_{1} \\mu_{2} + b_{1} k^{2} \\mu_{1} + b_{2} k^{2} \\mu_{2}}{2 b_{1} \\mu_{1} \\left(- \\Omega_{1} + k^{2}\\right)} & \\frac{k \\left(- \\Omega_{1} \\mu_{1} + \\Omega_{2} \\mu_{2} - a_{2} b_{1} \\mu_{1} + a_{2} b_{1} \\mu_{2}\\right)}{2 b_{1} \\mu_{1} \\left(- \\Omega_{1} + k^{2}\\right)} & \\frac{\\Omega_{1} b_{2} \\mu_{1} - \\Omega_{2} b_{1} \\mu_{2} + b_{1} k^{2} \\mu_{1} - b_{2} k^{2} \\mu_{2}}{2 b_{1} \\mu_{1} \\left(- \\Omega_{1} + k^{2}\\right)}\\\\\\frac{\\Omega_{1} a_{2} \\mu_{1} - \\Omega_{2} a_{1} \\mu_{2} + a_{1} k^{2} \\mu_{1} - a_{2} k^{2} \\mu_{2}}{2 a_{1} \\mu_{1} \\left(- \\Omega_{1} + k^{2}\\right)} & \\frac{k \\left(\\Omega_{1} \\mu_{1} - \\Omega_{2} \\mu_{2} + a_{1} b_{2} \\mu_{1} - a_{1} b_{2} \\mu_{2}\\right)}{2 a_{1} \\mu_{1} \\left(- \\Omega_{1} + k^{2}\\right)} & \\frac{- \\Omega_{1} a_{2} \\mu_{1} - \\Omega_{2} a_{1} \\mu_{2} + a_{1} k^{2} \\mu_{1} + a_{2} k^{2} \\mu_{2}}{2 a_{1} \\mu_{1} \\left(- \\Omega_{1} + k^{2}\\right)} & \\frac{k \\left(\\Omega_{1} \\mu_{1} - \\Omega_{2} \\mu_{2} - a_{1} b_{2} \\mu_{1} + a_{1} b_{2} \\mu_{2}\\right)}{2 a_{1} \\mu_{1} \\left(- \\Omega_{1} + k^{2}\\right)}\\\\\\frac{k \\left(\\Omega_{1} \\mu_{1} - \\Omega_{2} \\mu_{2} + a_{2} b_{1} \\mu_{1} - a_{2} b_{1} \\mu_{2}\\right)}{2 b_{1} \\mu_{1} \\left(- \\Omega_{1} + k^{2}\\right)} & \\frac{\\Omega_{1} b_{2} \\mu_{1} - \\Omega_{2} b_{1} \\mu_{2} + b_{1} k^{2} \\mu_{1} - b_{2} k^{2} \\mu_{2}}{2 b_{1} \\mu_{1} \\left(- \\Omega_{1} + k^{2}\\right)} & \\frac{k \\left(\\Omega_{1} \\mu_{1} - \\Omega_{2} \\mu_{2} - a_{2} b_{1} \\mu_{1} + a_{2} b_{1} \\mu_{2}\\right)}{2 b_{1} \\mu_{1} \\left(- \\Omega_{1} + k^{2}\\right)} & \\frac{- \\Omega_{1} b_{2} \\mu_{1} - \\Omega_{2} b_{1} \\mu_{2} + b_{1} k^{2} \\mu_{1} + b_{2} k^{2} \\mu_{2}}{2 b_{1} \\mu_{1} \\left(- \\Omega_{1} + k^{2}\\right)}\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "Matrix([\n",
       "[(-\\Omega_1*a_2*mu_1 - \\Omega_2*a_1*mu_2 + a_1*k**2*mu_1 + a_2*k**2*mu_2)/(2*a_1*mu_1*(-\\Omega_1 + k**2)),         k*(-\\Omega_1*mu_1 + \\Omega_2*mu_2 + a_1*b_2*mu_1 - a_1*b_2*mu_2)/(2*a_1*mu_1*(-\\Omega_1 + k**2)),  (\\Omega_1*a_2*mu_1 - \\Omega_2*a_1*mu_2 + a_1*k**2*mu_1 - a_2*k**2*mu_2)/(2*a_1*mu_1*(-\\Omega_1 + k**2)),         k*(-\\Omega_1*mu_1 + \\Omega_2*mu_2 - a_1*b_2*mu_1 + a_1*b_2*mu_2)/(2*a_1*mu_1*(-\\Omega_1 + k**2))],\n",
       "[        k*(-\\Omega_1*mu_1 + \\Omega_2*mu_2 + a_2*b_1*mu_1 - a_2*b_1*mu_2)/(2*b_1*mu_1*(-\\Omega_1 + k**2)), (-\\Omega_1*b_2*mu_1 - \\Omega_2*b_1*mu_2 + b_1*k**2*mu_1 + b_2*k**2*mu_2)/(2*b_1*mu_1*(-\\Omega_1 + k**2)),         k*(-\\Omega_1*mu_1 + \\Omega_2*mu_2 - a_2*b_1*mu_1 + a_2*b_1*mu_2)/(2*b_1*mu_1*(-\\Omega_1 + k**2)),  (\\Omega_1*b_2*mu_1 - \\Omega_2*b_1*mu_2 + b_1*k**2*mu_1 - b_2*k**2*mu_2)/(2*b_1*mu_1*(-\\Omega_1 + k**2))],\n",
       "[ (\\Omega_1*a_2*mu_1 - \\Omega_2*a_1*mu_2 + a_1*k**2*mu_1 - a_2*k**2*mu_2)/(2*a_1*mu_1*(-\\Omega_1 + k**2)),          k*(\\Omega_1*mu_1 - \\Omega_2*mu_2 + a_1*b_2*mu_1 - a_1*b_2*mu_2)/(2*a_1*mu_1*(-\\Omega_1 + k**2)), (-\\Omega_1*a_2*mu_1 - \\Omega_2*a_1*mu_2 + a_1*k**2*mu_1 + a_2*k**2*mu_2)/(2*a_1*mu_1*(-\\Omega_1 + k**2)),          k*(\\Omega_1*mu_1 - \\Omega_2*mu_2 - a_1*b_2*mu_1 + a_1*b_2*mu_2)/(2*a_1*mu_1*(-\\Omega_1 + k**2))],\n",
       "[         k*(\\Omega_1*mu_1 - \\Omega_2*mu_2 + a_2*b_1*mu_1 - a_2*b_1*mu_2)/(2*b_1*mu_1*(-\\Omega_1 + k**2)),  (\\Omega_1*b_2*mu_1 - \\Omega_2*b_1*mu_2 + b_1*k**2*mu_1 - b_2*k**2*mu_2)/(2*b_1*mu_1*(-\\Omega_1 + k**2)),          k*(\\Omega_1*mu_1 - \\Omega_2*mu_2 - a_2*b_1*mu_1 + a_2*b_1*mu_2)/(2*b_1*mu_1*(-\\Omega_1 + k**2)), (-\\Omega_1*b_2*mu_1 - \\Omega_2*b_1*mu_2 + b_1*k**2*mu_1 + b_2*k**2*mu_2)/(2*b_1*mu_1*(-\\Omega_1 + k**2))]])"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Ds1 = sp.Matrix([\n",
    "    [k,            b1,             k,            -b1],\n",
    "    [a1,            k,             -a1,           k],\n",
    "    [2*mu1*Omg1,     2*k*mu1*b1,      2*mu1*Omg1,     -2*k*mu1*b1],\n",
    "    [2*k*mu1*a1,     2*mu1*Omg1,      -2*k*mu1*a1,    2*mu1*Omg1]\n",
    "])\n",
    "\n",
    "Ds2 = sp.Matrix([\n",
    "    [k,            b2,             k,            -b2],\n",
    "    [a2,            k,             -a2,           k],\n",
    "    [2*mu2*Omg2,     2*k*mu2*b2,      2*mu2*Omg2,     -2*k*mu2*b2],\n",
    "    [2*k*mu2*a2,     2*mu2*Omg2,      -2*k*mu2*a2,    2*mu2*Omg2]\n",
    "])\n",
    "\n",
    "Q = sp.together(sp.expand(Ds1.inv() * Ds2))\n",
    "Q"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}\\frac{k^{2} \\left(\\Omega_{1} \\mu_{1} - \\Omega_{2} \\mu_{2} + a_{1} b_{2} \\mu_{1} - a_{1} b_{2} \\mu_{2}\\right) \\left(\\Omega_{1}^{2} \\mu_{1} - \\Omega_{1} \\Omega_{2} \\mu_{2} - \\Omega_{1} a_{2} b_{1} \\mu_{1} + \\Omega_{1} a_{2} b_{1} \\mu_{2} - \\Omega_{1} k^{2} \\mu_{1} + \\Omega_{2} k^{2} \\mu_{2} + a_{2} b_{1} k^{2} \\mu_{1} - a_{2} b_{1} k^{2} \\mu_{2}\\right) - \\left(\\Omega_{1} a_{2} \\mu_{1} - \\Omega_{2} a_{1} \\mu_{2} + a_{1} k^{2} \\mu_{1} - a_{2} k^{2} \\mu_{2}\\right) \\left(\\Omega_{1}^{2} b_{2} \\mu_{1} + \\Omega_{1} \\Omega_{2} b_{1} \\mu_{2} - \\Omega_{1} b_{1} k^{2} \\mu_{1} - \\Omega_{1} b_{2} k^{2} \\mu_{1} - \\Omega_{1} b_{2} k^{2} \\mu_{2} - \\Omega_{2} b_{1} k^{2} \\mu_{2} + b_{1} k^{4} \\mu_{1} + b_{2} k^{4} \\mu_{2}\\right)}{\\left(\\Omega_{1} - k^{2}\\right) \\left(\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}\\right)} & \\frac{2 b_{1} k \\left(\\Omega_{1} \\Omega_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1} a_{2} b_{2} \\mu_{1} \\mu_{2} - \\Omega_{1} k^{2} \\mu_{1}^{2} - \\Omega_{2}^{2} \\mu_{2}^{2} + \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{2} \\mu_{2}^{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}}\\\\\\frac{2 a_{1} k \\left(\\Omega_{1} \\Omega_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1} a_{2} b_{2} \\mu_{1} \\mu_{2} - \\Omega_{1} k^{2} \\mu_{1}^{2} - \\Omega_{2}^{2} \\mu_{2}^{2} + \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{2} \\mu_{2}^{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}} & \\frac{k^{2} \\left(\\Omega_{1} \\mu_{1} - \\Omega_{2} \\mu_{2} + a_{2} b_{1} \\mu_{1} - a_{2} b_{1} \\mu_{2}\\right) \\left(\\Omega_{1}^{2} \\mu_{1} - \\Omega_{1} \\Omega_{2} \\mu_{2} - \\Omega_{1} a_{1} b_{2} \\mu_{1} + \\Omega_{1} a_{1} b_{2} \\mu_{2} - \\Omega_{1} k^{2} \\mu_{1} + \\Omega_{2} k^{2} \\mu_{2} + a_{1} b_{2} k^{2} \\mu_{1} - a_{1} b_{2} k^{2} \\mu_{2}\\right) - \\left(\\Omega_{1} b_{2} \\mu_{1} - \\Omega_{2} b_{1} \\mu_{2} + b_{1} k^{2} \\mu_{1} - b_{2} k^{2} \\mu_{2}\\right) \\left(\\Omega_{1}^{2} a_{2} \\mu_{1} + \\Omega_{1} \\Omega_{2} a_{1} \\mu_{2} - \\Omega_{1} a_{1} k^{2} \\mu_{1} - \\Omega_{1} a_{2} k^{2} \\mu_{1} - \\Omega_{1} a_{2} k^{2} \\mu_{2} - \\Omega_{2} a_{1} k^{2} \\mu_{2} + a_{1} k^{4} \\mu_{1} + a_{2} k^{4} \\mu_{2}\\right)}{\\left(\\Omega_{1} - k^{2}\\right) \\left(\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}\\right)}\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "<IPython.core.display.Math object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}\\frac{k^{2} \\left(\\Omega_{1} \\mu_{1} - \\Omega_{2} \\mu_{2} + a_{2} b_{1} \\mu_{1} - a_{2} b_{1} \\mu_{2}\\right) \\left(\\Omega_{1}^{2} \\mu_{1} - \\Omega_{1} \\Omega_{2} \\mu_{2} - \\Omega_{1} a_{1} b_{2} \\mu_{1} + \\Omega_{1} a_{1} b_{2} \\mu_{2} - \\Omega_{1} k^{2} \\mu_{1} + \\Omega_{2} k^{2} \\mu_{2} + a_{1} b_{2} k^{2} \\mu_{1} - a_{1} b_{2} k^{2} \\mu_{2}\\right) + \\left(\\Omega_{1} a_{2} \\mu_{1} - \\Omega_{2} a_{1} \\mu_{2} + a_{1} k^{2} \\mu_{1} - a_{2} k^{2} \\mu_{2}\\right) \\left(\\Omega_{1}^{2} b_{2} \\mu_{1} + \\Omega_{1} \\Omega_{2} b_{1} \\mu_{2} - \\Omega_{1} b_{1} k^{2} \\mu_{1} - \\Omega_{1} b_{2} k^{2} \\mu_{1} - \\Omega_{1} b_{2} k^{2} \\mu_{2} - \\Omega_{2} b_{1} k^{2} \\mu_{2} + b_{1} k^{4} \\mu_{1} + b_{2} k^{4} \\mu_{2}\\right)}{\\left(\\Omega_{1} - k^{2}\\right) \\left(\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}\\right)} & \\frac{2 b_{2} k \\left(\\Omega_{1}^{2} \\mu_{1}^{2} - \\Omega_{1} \\Omega_{2} \\mu_{1} \\mu_{2} - \\Omega_{1} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2} a_{1} b_{1} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{1} \\mu_{2}^{2} + \\Omega_{2} k^{2} \\mu_{2}^{2} - a_{1} b_{1} k^{2} \\mu_{1}^{2} + a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}}\\\\\\frac{2 a_{2} k \\left(\\Omega_{1}^{2} \\mu_{1}^{2} - \\Omega_{1} \\Omega_{2} \\mu_{1} \\mu_{2} - \\Omega_{1} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2} a_{1} b_{1} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{1} \\mu_{2}^{2} + \\Omega_{2} k^{2} \\mu_{2}^{2} - a_{1} b_{1} k^{2} \\mu_{1}^{2} + a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}} & \\frac{k^{2} \\left(\\Omega_{1} \\mu_{1} - \\Omega_{2} \\mu_{2} + a_{1} b_{2} \\mu_{1} - a_{1} b_{2} \\mu_{2}\\right) \\left(\\Omega_{1}^{2} \\mu_{1} - \\Omega_{1} \\Omega_{2} \\mu_{2} - \\Omega_{1} a_{2} b_{1} \\mu_{1} + \\Omega_{1} a_{2} b_{1} \\mu_{2} - \\Omega_{1} k^{2} \\mu_{1} + \\Omega_{2} k^{2} \\mu_{2} + a_{2} b_{1} k^{2} \\mu_{1} - a_{2} b_{1} k^{2} \\mu_{2}\\right) + \\left(\\Omega_{1} b_{2} \\mu_{1} - \\Omega_{2} b_{1} \\mu_{2} + b_{1} k^{2} \\mu_{1} - b_{2} k^{2} \\mu_{2}\\right) \\left(\\Omega_{1}^{2} a_{2} \\mu_{1} + \\Omega_{1} \\Omega_{2} a_{1} \\mu_{2} - \\Omega_{1} a_{1} k^{2} \\mu_{1} - \\Omega_{1} a_{2} k^{2} \\mu_{1} - \\Omega_{1} a_{2} k^{2} \\mu_{2} - \\Omega_{2} a_{1} k^{2} \\mu_{2} + a_{1} k^{4} \\mu_{1} + a_{2} k^{4} \\mu_{2}\\right)}{\\left(\\Omega_{1} - k^{2}\\right) \\left(\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}\\right)}\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "<IPython.core.display.Math object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}\\frac{2 a_{1} \\mu_{1} \\left(\\Omega_{1}^{2} b_{2} \\mu_{1} + \\Omega_{1} \\Omega_{2} b_{1} \\mu_{2} - \\Omega_{1} b_{1} k^{2} \\mu_{1} - \\Omega_{1} b_{2} k^{2} \\mu_{1} - \\Omega_{1} b_{2} k^{2} \\mu_{2} - \\Omega_{2} b_{1} k^{2} \\mu_{2} + b_{1} k^{4} \\mu_{1} + b_{2} k^{4} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}} & \\frac{2 b_{1} k \\mu_{1} \\left(\\Omega_{1}^{2} \\mu_{1} - \\Omega_{1} \\Omega_{2} \\mu_{2} - \\Omega_{1} a_{1} b_{2} \\mu_{1} + \\Omega_{1} a_{1} b_{2} \\mu_{2} - \\Omega_{1} k^{2} \\mu_{1} + \\Omega_{2} k^{2} \\mu_{2} + a_{1} b_{2} k^{2} \\mu_{1} - a_{1} b_{2} k^{2} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}}\\\\\\frac{2 a_{1} k \\mu_{1} \\left(\\Omega_{1}^{2} \\mu_{1} - \\Omega_{1} \\Omega_{2} \\mu_{2} - \\Omega_{1} a_{2} b_{1} \\mu_{1} + \\Omega_{1} a_{2} b_{1} \\mu_{2} - \\Omega_{1} k^{2} \\mu_{1} + \\Omega_{2} k^{2} \\mu_{2} + a_{2} b_{1} k^{2} \\mu_{1} - a_{2} b_{1} k^{2} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}} & \\frac{2 b_{1} \\mu_{1} \\left(\\Omega_{1}^{2} a_{2} \\mu_{1} + \\Omega_{1} \\Omega_{2} a_{1} \\mu_{2} - \\Omega_{1} a_{1} k^{2} \\mu_{1} - \\Omega_{1} a_{2} k^{2} \\mu_{1} - \\Omega_{1} a_{2} k^{2} \\mu_{2} - \\Omega_{2} a_{1} k^{2} \\mu_{2} + a_{1} k^{4} \\mu_{1} + a_{2} k^{4} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}}\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "<IPython.core.display.Math object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}\\frac{2 a_{2} \\mu_{2} \\left(\\Omega_{1} \\Omega_{2} b_{2} \\mu_{1} - \\Omega_{1} b_{2} k^{2} \\mu_{1} + \\Omega_{2}^{2} b_{1} \\mu_{2} - \\Omega_{2} b_{1} k^{2} \\mu_{1} - \\Omega_{2} b_{1} k^{2} \\mu_{2} - \\Omega_{2} b_{2} k^{2} \\mu_{2} + b_{1} k^{4} \\mu_{1} + b_{2} k^{4} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}} & \\frac{2 b_{2} k \\mu_{2} \\left(\\Omega_{1} \\Omega_{2} \\mu_{1} - \\Omega_{1} k^{2} \\mu_{1} - \\Omega_{2}^{2} \\mu_{2} - \\Omega_{2} a_{2} b_{1} \\mu_{1} + \\Omega_{2} a_{2} b_{1} \\mu_{2} + \\Omega_{2} k^{2} \\mu_{2} + a_{2} b_{1} k^{2} \\mu_{1} - a_{2} b_{1} k^{2} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}}\\\\\\frac{2 a_{2} k \\mu_{2} \\left(\\Omega_{1} \\Omega_{2} \\mu_{1} - \\Omega_{1} k^{2} \\mu_{1} - \\Omega_{2}^{2} \\mu_{2} - \\Omega_{2} a_{1} b_{2} \\mu_{1} + \\Omega_{2} a_{1} b_{2} \\mu_{2} + \\Omega_{2} k^{2} \\mu_{2} + a_{1} b_{2} k^{2} \\mu_{1} - a_{1} b_{2} k^{2} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}} & \\frac{2 b_{2} \\mu_{2} \\left(\\Omega_{1} \\Omega_{2} a_{2} \\mu_{1} - \\Omega_{1} a_{2} k^{2} \\mu_{1} + \\Omega_{2}^{2} a_{1} \\mu_{2} - \\Omega_{2} a_{1} k^{2} \\mu_{1} - \\Omega_{2} a_{1} k^{2} \\mu_{2} - \\Omega_{2} a_{2} k^{2} \\mu_{2} + a_{1} k^{4} \\mu_{1} + a_{2} k^{4} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}}\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "<IPython.core.display.Math object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "Q11 = Q[:2, :2]\n",
    "Q12 = Q[:2, 2:]\n",
    "Q21 = Q[2:, :2]\n",
    "Q22 = Q[2:, 2:]\n",
    "\n",
    "TD = Q22**(-1)\n",
    "RD = Q12*TD\n",
    "RU = -TD*Q21\n",
    "TU = Q11 - Q12*TD*Q21\n",
    "\n",
    "TD = sp.together(TD).simplify()\n",
    "RD = sp.together(RD).simplify()\n",
    "RU = sp.together(RU).simplify()\n",
    "TU = sp.together(TU).simplify()\n",
    "\n",
    "display(Math(latex(RD)))\n",
    "display(Math(latex(RU)))\n",
    "display(Math(latex(TD)))\n",
    "display(Math(latex(TU)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 本文档推导方法"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}\\frac{- \\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} + \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} - \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} + \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} - a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} - a_{2} b_{2} k^{4} \\mu_{2}^{2}}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}} & \\frac{2 k \\left(\\Omega_{1} \\Omega_{2} b_{1} \\mu_{1} \\mu_{2} + \\Omega_{1} a_{2} b_{1} b_{2} \\mu_{1}^{2} - \\Omega_{1} a_{2} b_{1} b_{2} \\mu_{1} \\mu_{2} - \\Omega_{1} b_{1} k^{2} \\mu_{1}^{2} - \\Omega_{2}^{2} b_{1} \\mu_{2}^{2} + \\Omega_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} + a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}}\\\\\\frac{2 k \\left(\\Omega_{1} \\Omega_{2} a_{1} \\mu_{1} \\mu_{2} + \\Omega_{1} a_{1} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1} a_{1} a_{2} b_{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} k^{2} \\mu_{1}^{2} - \\Omega_{2}^{2} a_{1} \\mu_{2}^{2} + \\Omega_{2} a_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + a_{1} a_{2} b_{2} k^{2} \\mu_{2}^{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}} & \\frac{- \\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} + \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} - \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} + \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} - a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} - a_{2} b_{2} k^{4} \\mu_{2}^{2}}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}}\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "<IPython.core.display.Math object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}\\frac{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} + \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} - \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} + \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} + 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} - a_{1} b_{1} k^{4} \\mu_{1}^{2} - a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}} & \\frac{2 k \\left(\\Omega_{1}^{2} b_{2} \\mu_{1}^{2} - \\Omega_{1} \\Omega_{2} b_{2} \\mu_{1} \\mu_{2} - \\Omega_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2} a_{1} b_{1} b_{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{1} b_{2} \\mu_{2}^{2} + \\Omega_{2} b_{2} k^{2} \\mu_{2}^{2} - a_{1} b_{1} b_{2} k^{2} \\mu_{1}^{2} + a_{1} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}}\\\\\\frac{2 k \\left(\\Omega_{1}^{2} a_{2} \\mu_{1}^{2} - \\Omega_{1} \\Omega_{2} a_{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2} a_{1} a_{2} b_{1} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} a_{2} b_{1} \\mu_{2}^{2} + \\Omega_{2} a_{2} k^{2} \\mu_{2}^{2} - a_{1} a_{2} b_{1} k^{2} \\mu_{1}^{2} + a_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}} & \\frac{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} + \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} - \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} + \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} + 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} - a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} - a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}}\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "<IPython.core.display.Math object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}\\frac{2 \\mu_{1} \\left(\\Omega_{1}^{2} a_{1} b_{2} \\mu_{1} + \\Omega_{1} \\Omega_{2} a_{1} b_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{1} k^{2} \\mu_{1} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{2} - \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{2} + a_{1} b_{1} k^{4} \\mu_{1} + a_{1} b_{2} k^{4} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}} & \\frac{2 k \\mu_{1} \\left(\\Omega_{1}^{2} b_{1} \\mu_{1} - \\Omega_{1} \\Omega_{2} b_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{1} b_{2} \\mu_{1} + \\Omega_{1} a_{1} b_{1} b_{2} \\mu_{2} - \\Omega_{1} b_{1} k^{2} \\mu_{1} + \\Omega_{2} b_{1} k^{2} \\mu_{2} + a_{1} b_{1} b_{2} k^{2} \\mu_{1} - a_{1} b_{1} b_{2} k^{2} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}}\\\\\\frac{2 k \\mu_{1} \\left(\\Omega_{1}^{2} a_{1} \\mu_{1} - \\Omega_{1} \\Omega_{2} a_{1} \\mu_{2} - \\Omega_{1} a_{1} a_{2} b_{1} \\mu_{1} + \\Omega_{1} a_{1} a_{2} b_{1} \\mu_{2} - \\Omega_{1} a_{1} k^{2} \\mu_{1} + \\Omega_{2} a_{1} k^{2} \\mu_{2} + a_{1} a_{2} b_{1} k^{2} \\mu_{1} - a_{1} a_{2} b_{1} k^{2} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}} & \\frac{2 \\mu_{1} \\left(\\Omega_{1}^{2} a_{2} b_{1} \\mu_{1} + \\Omega_{1} \\Omega_{2} a_{1} b_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{1} k^{2} \\mu_{1} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{2} - \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{2} + a_{1} b_{1} k^{4} \\mu_{1} + a_{2} b_{1} k^{4} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}}\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "<IPython.core.display.Math object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}\\frac{2 \\mu_{2} \\left(\\Omega_{1} \\Omega_{2} a_{2} b_{2} \\mu_{1} - \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} + \\Omega_{2}^{2} a_{2} b_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{2} - \\Omega_{2} a_{2} b_{2} k^{2} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} + a_{2} b_{2} k^{4} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}} & \\frac{2 k \\mu_{2} \\left(\\Omega_{1} \\Omega_{2} b_{2} \\mu_{1} - \\Omega_{1} b_{2} k^{2} \\mu_{1} - \\Omega_{2}^{2} b_{2} \\mu_{2} - \\Omega_{2} a_{2} b_{1} b_{2} \\mu_{1} + \\Omega_{2} a_{2} b_{1} b_{2} \\mu_{2} + \\Omega_{2} b_{2} k^{2} \\mu_{2} + a_{2} b_{1} b_{2} k^{2} \\mu_{1} - a_{2} b_{1} b_{2} k^{2} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}}\\\\\\frac{2 k \\mu_{2} \\left(\\Omega_{1} \\Omega_{2} a_{2} \\mu_{1} - \\Omega_{1} a_{2} k^{2} \\mu_{1} - \\Omega_{2}^{2} a_{2} \\mu_{2} - \\Omega_{2} a_{1} a_{2} b_{2} \\mu_{1} + \\Omega_{2} a_{1} a_{2} b_{2} \\mu_{2} + \\Omega_{2} a_{2} k^{2} \\mu_{2} + a_{1} a_{2} b_{2} k^{2} \\mu_{1} - a_{1} a_{2} b_{2} k^{2} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}} & \\frac{2 \\mu_{2} \\left(\\Omega_{1} \\Omega_{2} a_{2} b_{2} \\mu_{1} - \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} + \\Omega_{2}^{2} a_{1} b_{2} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{2} - \\Omega_{2} a_{2} b_{2} k^{2} \\mu_{2} + a_{1} b_{2} k^{4} \\mu_{1} + a_{2} b_{2} k^{4} \\mu_{2}\\right)}{\\Omega_{1}^{2} a_{2} b_{2} \\mu_{1}^{2} - \\Omega_{1}^{2} k^{2} \\mu_{1}^{2} + \\Omega_{1} \\Omega_{2} a_{1} b_{2} \\mu_{1} \\mu_{2} + \\Omega_{1} \\Omega_{2} a_{2} b_{1} \\mu_{1} \\mu_{2} + 2 \\Omega_{1} \\Omega_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{1} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - 2 \\Omega_{1} a_{2} b_{2} k^{2} \\mu_{1} \\mu_{2} + \\Omega_{2}^{2} a_{1} b_{1} \\mu_{2}^{2} - \\Omega_{2}^{2} k^{2} \\mu_{2}^{2} - 2 \\Omega_{2} a_{1} b_{1} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - \\Omega_{2} a_{2} b_{1} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1}^{2} + 2 a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{1} \\mu_{2} - a_{1} a_{2} b_{1} b_{2} k^{2} \\mu_{2}^{2} + a_{1} b_{1} k^{4} \\mu_{1}^{2} + a_{1} b_{2} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{1} k^{4} \\mu_{1} \\mu_{2} + a_{2} b_{2} k^{4} \\mu_{2}^{2}}\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "<IPython.core.display.Math object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# [TU, RD],\n",
    "# [RU, TD],\n",
    "\n",
    "# left\n",
    "Pl = sp.Matrix([\n",
    "    [(-1)*k,            (-1)*b1,           k,            -b2],\n",
    "    [(-1)*a1,           (-1)*k,            -a2,           k,],\n",
    "    [(-1)*2*mu1*Omg1,   (-1)*2*k*mu1*b1,   2*mu2*Omg2,     -2*k*mu2*b2,  ],\n",
    "    [(-1)*2*k*mu1*a1,   (-1)*2*mu1*Omg1,   -2*k*mu2*a2,    2*mu2*Omg2,  ]\n",
    "])\n",
    "\n",
    "# right\n",
    "# (-1) 系数均是由移项形成的\n",
    "Pr = sp.Matrix([\n",
    "    [(-1)*k,            (-1)*b2,           k,            -b1],\n",
    "    [(-1)*a2,           (-1)*k,            -a1,           k,],\n",
    "    [(-1)*2*mu2*Omg2,   (-1)*2*k*mu2*b2,   2*mu1*Omg1,     -2*k*mu1*b1,  ],\n",
    "    [(-1)*2*k*mu2*a2,   (-1)*2*mu2*Omg2,   -2*k*mu1*a1,    2*mu1*Omg1,  ]\n",
    "])\n",
    "\n",
    "Q = sp.together(sp.expand(Pl.inv() * Pr))\n",
    "\n",
    "TU2 = Q[:2, :2]\n",
    "RU2 = Q[2:, :2]\n",
    "RD2 = Q[:2, 2:]\n",
    "TD2 = Q[2:, 2:]\n",
    "\n",
    "display(Math(latex(RD2)))\n",
    "display(Math(latex(RU2)))\n",
    "display(Math(latex(TD2)))\n",
    "display(Math(latex(TU2)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 结果对比\n",
    "直接将两个方法结果的表达式相减，全为0即为通过"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}0 & 0\\\\0 & 0\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "Matrix([\n",
       "[0, 0],\n",
       "[0, 0]])"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# RD\n",
    "test = (RD - RD2).simplify()\n",
    "\n",
    "test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}0 & 0\\\\0 & 0\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "Matrix([\n",
       "[0, 0],\n",
       "[0, 0]])"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# RU\n",
    "test = (RU - RU2).simplify()\n",
    "\n",
    "test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}0 & 0\\\\0 & 0\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "Matrix([\n",
       "[0, 0],\n",
       "[0, 0]])"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# TD\n",
    "test = (TD - TD2).simplify()\n",
    "\n",
    "test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}0 & 0\\\\0 & 0\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "Matrix([\n",
       "[0, 0],\n",
       "[0, 0]])"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# TU\n",
    "test = (TU - TU2).simplify()\n",
    "\n",
    "test"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "py310",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.14"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
